<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="../../css/base.css" />
    <link rel="stylesheet" href="./css/index.css" />
    <script src="https://cdn.bootcss.com/jquery/3.5.0/jquery.min.js"></script>
    <script src="../../css/loding.css"></script>
    <script src="../../index.js"></script>
    <title>Document</title>
  </head>

  <body>
    <div class="head">
      <ul class="nav_list">
        <li class="nav_item">
          <a href="../../index.html">首页<span class="item_off">/</span> </a>
        </li>
        <li class="nav_item">
          <a href="../serve/index.html"
            >服务领域<span class="item_off">/</span></a
          >
        </li>
        <li class="nav_item active_a">
          <a href="javascript:;">实时新闻<span class="item_off">/</span></a>
        </li>
        <li class="nav_item">
          <a href="../about/index.html"
            >关于我们<span class="item_off">/</span></a
          >
        </li>
        <li class="nav_item"><a href="../contactUs/index.html">联系我们</a></li>
      </ul>
    </div>
    <div class="w">
      <div class="what_you">
        <p class="what_title">REAL-TIME NEWS</p>
        <p class="what_name">实时新闻</p>
        <div class="what_off"></div>
        <p class="what_cont">
          掌握实时国际新闻动态，了解实时科技资讯，走在数据大时代的前端。
        </p>
      </div>
      <div id="preloader1">
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
      </div>
      <div class="news_top">
        <ul class="top_list">
          <!-- <li class="top_item"><img src="./img/newstop1.png" alt="" /></li> -->
          <!-- <li class="top_item top_item_right">
            <div class="top_item_cont pointer">
              <img src="./img/newtop2.png" alt="" />
              <div class="cont_box">
                <p class="cont_title">
                  <span class="cont_title_one">科技实时新闻</span
                  ><span class="cont_title_tiem">2020.3.25</span>
                </p>
                <p class="cont_cont">
                  是一家从事近距离无线网络领域的技术型企业。芯感电子的核心研发团队成员由目前国内无线通信领域的资深
                </p>
              </div>
            </div>
            <div class="top_item_cont pointer">
              <img src="./img/newtop2.png" alt="" />
              <div class="cont_box">
                <p class="cont_title">
                  <span class="cont_title_one">科技实时新闻</span
                  ><span class="cont_title_tiem">2020.3.25</span>
                </p>
                <p class="cont_cont">
                  是一家从事近距离无线网络领域的技术型企业。芯感电子的核心研发团队成员由目前国内无线通信领域的资深
                </p>
              </div>
            </div>
          </li> -->
        </ul>
      </div>
      <div class="news_bottom">
        <ul class="bottom_list">
          <li class="bottom_item">
            <img class="bottom_item_img" src="./img/xinwenbottom.png" alt="" />
            <div class="cont_box">
              <p class="cont_title">
                <span class="cont_title_one">科技实时新闻</span
                ><span class="cont_title_tiem">2020.3.25</span>
              </p>
              <p class="cont_cont">
                是一家从事近距离无线网络领域的技术型企业。芯感电子的核心研发团队成员由目前国内无线通信领域的资深
              </p>
            </div>
          </li>
          <li class="bottom_item">
            <img class="bottom_item_img" src="./img/xinwenbottom.png" alt="" />
            <div class="cont_box">
              <p class="cont_title">
                <span class="cont_title_one">科技实时新闻</span
                ><span class="cont_title_tiem">2020.3.25</span>
              </p>
              <p class="cont_cont">
                是一家从事近距离无线网络领域的技术型企业。芯感电子的核心研发团队成员由目前国内无线通信领域的资深
              </p>
            </div>
          </li>
        </ul>
      </div>
    </div>
    <div class="foot">
      <div class="foot_cont">
        <div class="font_box">
          <p class="title title_c">友情链接</p>
          <div style="line-height: 46px;">
            <p class="title pointer">
              郑州市芯感电子科技有限公司公交产品网站：www.xinganbus.com
            </p>
            <p class="title pointer">
              郑州市芯感电子科技有限公司茶城通产品网站：www.xgpays.com
            </p>
            <p class="title">备案序号：豫ICP备20004924号-2</p>
          </div>
        </div>
        <div>
          <img style="width: 260px;" src="./img/logo.png" alt="" />
        </div>
      </div>
      <div class="foot_bottom">
        版权政策为我公司所有
      </div>
    </div>
  </body>
  <script>
    Date.prototype.Format = function (fmt) {
      var o = {
        'M+': this.getMonth() + 1, // 月份
        'd+': this.getDate(), // 日
        'h+': this.getHours(), // 小时
        'm+': this.getMinutes(), // 分
        's+': this.getSeconds(), // 秒
        'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
        S: this.getMilliseconds(), // 毫秒
      }
      if (/(y+)/.test(fmt))
        fmt = fmt.replace(RegExp.$1, this.getFullYear() + '')
      for (var k in o)
        if (new RegExp('(' + k + ')').test(fmt))
          fmt = fmt.replace(
            RegExp.$1,
            RegExp.$1.length == 1
              ? o[k]
              : ('00' + o[k]).substr(('' + o[k]).length)
          )
      return fmt
    }

    $(function () {
      Api.myPost(
        '/public/findNews',
        { page: 1, limit: 99999, indexImg: '' },
        (res) => {
          console.log(res.data, '关于我们')
          res.data.forEach((item) => {
            item.createTime = new Date(item.createTime).Format('yy-MM-dd')
          })
          var strTop = `<ul class="top_list">
          <li class="top_item"><img src="./img/newstop1.png" alt="" /></li>
          <li class="top_item top_item_right">
            <div class="top_item_cont pointer">
              <img src="./img/newtop2.png" alt="" />
              <div class="cont_box">
                <p class="cont_title">
                  <span class="cont_title_one">${res.data[0].title}</span
                  ><span class="cont_title_tiem">${res.data[0].createTime}</span>
                </p>
                <p class="cont_cont">
                  ${res.data[0].title}
                </p>
              </div>
            </div>
            <div class="top_item_cont pointer">
              <img src="./img/newtop2.png" alt="" />
              <div class="cont_box">
                <p class="cont_title">
                  <span class="cont_title_one">${res.data[1].title}</span
                  ><span class="cont_title_tiem">${res.data[1].createTime}</span>
                </p>
                <p class="cont_cont">
                 ${res.data[1].title}
                </p>
              </div>
            </div>
          </li>
        </ul>`
          $('.news_top').append(strTop)
        }
      )
    })
    $('.top_item_cont').click(function () {
      console.log($(this))
      window.location.href = './details.html'
    })
  </script>
</html>
